\section{/usr/local/home/accts/cs613010/mpimt/mpimt/src/env.c File Reference}
\label{env_8c}\index{/usr/local/home/accts/cs613010/mpimt/mpimt/src/env.c@{/usr/local/home/accts/cs613010/mpimt/mpimt/src/env.c}}
All of the methods that make up the environment portion of MPI. 

{\tt \#include $<$stdlib.h$>$}\par
{\tt \#include $<$stdio.h$>$}\par
{\tt \#include $<$unistd.h$>$}\par
{\tt \#include $<$string.h$>$}\par
{\tt \#include $<$sys/types.h$>$}\par
{\tt \#include $<$sys/timeb.h$>$}\par
{\tt \#include $<$apr\_\-general.h$>$}\par
{\tt \#include $<$apr\_\-pools.h$>$}\par
{\tt \#include $<$apr\_\-network\_\-io.h$>$}\par
{\tt \#include \char`\"{}mpi.h\char`\"{}}\par
{\tt \#include \char`\"{}cm.h\char`\"{}}\par
{\tt \#include \char`\"{}pmi.h\char`\"{}}\par
{\tt \#include \char`\"{}oom.h\char`\"{}}\par
{\tt \#include \char`\"{}log.h\char`\"{}}\par
\subsection*{Defines}
\begin{CompactItemize}
\item 
\#define {\bf MPI\_\-VERSION}~1\label{env_8c_a0}

\item 
\#define {\bf MPI\_\-SUBVERSION}~1\label{env_8c_a1}

\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
int {\bf MPI\_\-Get\_\-version} (int $\ast$version, int $\ast$subversion)
\begin{CompactList}\small\item\em get the current version of the implementation \item\end{CompactList}\item 
int {\bf MPI\_\-Get\_\-processor\_\-name} (char $\ast$name, int $\ast$resultlen)
\begin{CompactList}\small\item\em get the name of the current host upon which this process is running on \item\end{CompactList}\item 
double {\bf MPI\_\-Wtime} ()
\begin{CompactList}\small\item\em Returns an elapsed time on the calling processor. \item\end{CompactList}\item 
double {\bf MPI\_\-Wtick} ()
\begin{CompactList}\small\item\em MPI\_\-Wtick returns the resolution of MPI\_\-WTIME in seconds. \item\end{CompactList}\item 
int {\bf MPI\_\-Init} (int $\ast$argc, char $\ast$$\ast$$\ast$argv)
\begin{CompactList}\small\item\em Initialize the MPI execution environment. \item\end{CompactList}\item 
int {\bf MPI\_\-Finalize} ()
\begin{CompactList}\small\item\em Terminates MPI execution environment. \item\end{CompactList}\item 
int {\bf MPI\_\-Initialized} (int $\ast$flag)
\begin{CompactList}\small\item\em Indicates whether MPI\_\-Init has been called. \item\end{CompactList}\item 
int {\bf MPI\_\-Abort} (MPI\_\-Comm comm, int errorcode)
\begin{CompactList}\small\item\em Terminates MPI execution environment. \item\end{CompactList}\item 
int {\bf get\_\-world\_\-rank} ()\label{env_8c_a19}

\item 
int {\bf get\_\-world\_\-size} ()\label{env_8c_a20}

\item 
const char $\ast$ {\bf get\_\-processor\_\-host} (int world\_\-rank)\label{env_8c_a21}

\item 
int {\bf get\_\-processor\_\-port} (int world\_\-rank)\label{env_8c_a22}

\end{CompactItemize}


\subsection{Detailed Description}
All of the methods that make up the environment portion of MPI. 



\subsection{Function Documentation}
\index{env.c@{env.c}!MPI_Abort@{MPI\_\-Abort}}
\index{MPI_Abort@{MPI\_\-Abort}!env.c@{env.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int MPI\_\-Abort (MPI\_\-Comm {\em comm}, int {\em errorcode})}\label{env_8c_a18}


Terminates MPI execution environment. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em comm}]communicator of tasks to abort \item[{\em errorcode}]error code to return to invoking environment \end{description}
\end{Desc}
\index{env.c@{env.c}!MPI_Finalize@{MPI\_\-Finalize}}
\index{MPI_Finalize@{MPI\_\-Finalize}!env.c@{env.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int MPI\_\-Finalize (void)}\label{env_8c_a16}


Terminates MPI execution environment. 

\begin{Desc}
\item[Returns:]status code \end{Desc}
\index{env.c@{env.c}!MPI_Get_processor_name@{MPI\_\-Get\_\-processor\_\-name}}
\index{MPI_Get_processor_name@{MPI\_\-Get\_\-processor\_\-name}!env.c@{env.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int MPI\_\-Get\_\-processor\_\-name (char $\ast$ {\em name}, int $\ast$ {\em resultlen})}\label{env_8c_a12}


get the name of the current host upon which this process is running on 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em name}]a character array for the hostname \item[{\em resulten}]the length of the hostname \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]currently only returns MPI\_\-SUCCESS \end{Desc}
\index{env.c@{env.c}!MPI_Get_version@{MPI\_\-Get\_\-version}}
\index{MPI_Get_version@{MPI\_\-Get\_\-version}!env.c@{env.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int MPI\_\-Get\_\-version (int $\ast$ {\em version}, int $\ast$ {\em subversion})}\label{env_8c_a11}


get the current version of the implementation 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em version}]an integer to hold the version \item[{\em subversion}]an integer to hold the subversion \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]currently only returns MPI\_\-SUCCESS \end{Desc}
\index{env.c@{env.c}!MPI_Init@{MPI\_\-Init}}
\index{MPI_Init@{MPI\_\-Init}!env.c@{env.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int MPI\_\-Init (int $\ast$ {\em argc}, char $\ast$$\ast$$\ast$ {\em argv})}\label{env_8c_a15}


Initialize the MPI execution environment. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em argc}]pointer to the number of arguments \item[{\em argv}]pointer to the argument vector \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]error or success \end{Desc}
\index{env.c@{env.c}!MPI_Initialized@{MPI\_\-Initialized}}
\index{MPI_Initialized@{MPI\_\-Initialized}!env.c@{env.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int MPI\_\-Initialized (int $\ast$ {\em flag})}\label{env_8c_a17}


Indicates whether MPI\_\-Init has been called. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em flag}]pointer to the variable which will hold the status \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]currently returns only MPI\_\-SUCCESS \end{Desc}
\index{env.c@{env.c}!MPI_Wtick@{MPI\_\-Wtick}}
\index{MPI_Wtick@{MPI\_\-Wtick}!env.c@{env.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}double MPI\_\-Wtick (void)}\label{env_8c_a14}


MPI\_\-Wtick returns the resolution of MPI\_\-WTIME in seconds. 

\begin{Desc}
\item[Returns:]MPI\_\-WTICK returns the resolution of MPI\_\-WTIME in seconds. That is, it returns, as a double precision value, the number of seconds between successive clock ticks. For example, if the clock is implemented by the hardware as a counter that is incremented every millisecond, the value returned by MPI\_\-WTICK should be . \end{Desc}
\index{env.c@{env.c}!MPI_Wtime@{MPI\_\-Wtime}}
\index{MPI_Wtime@{MPI\_\-Wtime}!env.c@{env.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}double MPI\_\-Wtime (void)}\label{env_8c_a13}


Returns an elapsed time on the calling processor. 

\begin{Desc}
\item[Returns:]Time in seconds since an arbitrary time in the past. \end{Desc}
